/**
 * Created by MADinow on 26.10.2014.
 */

/* -----------------------------------------------------------
         MAIN CONTENT UI MODULE
 ----------------------------------------------------------- */


define(['settings/variables', 'ui/madGenerator', 'jquery', 'jquery_ui'],
    function (Variables, Genny) {

        /**
         * main content section
         */
        var _mainContent ;

        /**
         * getter for the main content section
         * @returns the main content section
         * @private
         */
        function _getMainContent(){
            return _mainContent ;
        }

        /**
         * initializes the main content
         * @param targetDom
         * @private
         */
        function _initMainContent(targetDom){
            _mainContent = Genny.createDiv(targetDom, 'main-content', 'container-absolute main-content-container', true);
            var h = Genny.createHeading(_mainContent, '', '', '', 'Welcome', 'h2', true);
            var pText = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod '+
                'tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. '+
                'At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, '+
                'no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, '+
                'consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et '+
                'dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo '+
                'dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum '+
                'dolor sit amet'
            var p = Genny.createParagraph(_mainContent, '', '', '', pText, true);
            _mainContent.show();
        }

        /**
         * blurs the main content section
         * @private
         */
        function _blurContentScreen(){
            _mainContent.stop(true, false).animate({ opacity: 0.25}, 350);
        }

        /**
         * refocuses the main content section
         * @private
         */
        function _focusContentScreen(){
            _mainContent.stop(true, false).animate({ opacity: 1 }, 350);
        }



        /**
         * public interface
         */
        return {

            /* variables | getters & setters*/
            getMainContent: _getMainContent,

            /* functions */
            initMainContent: _initMainContent,
            blurContentScreen: _blurContentScreen,
            focusContentScreen: _focusContentScreen

        }

    }
);